(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^4).


The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Rewrite Strategy: INNERMOST

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of plus: p, plus, eq, zero, divides, div, if, pr, times, quot
The following defined symbols can occur below the 1th argument of plus: p, plus, eq, zero, divides, div, if, pr, times, quot
The following defined symbols can occur below the 0th argument of p: p, plus, eq, zero, divides, div, if, pr, times, quot
The following defined symbols can occur below the 0th argument of if: p, plus, eq, divides, div, times, quot
The following defined symbols can occur below the 1th argument of if: p, plus, eq, zero, divides, div, if, pr, times, quot
The following defined symbols can occur below the 2th argument of if: p, plus, eq, zero, divides, div, if, pr, times, quot
The following defined symbols can occur below the 1th argument of eq: p, plus, div, times, quot
The following defined symbols can occur below the 0th argument of times: div, quot
The following defined symbols can occur below the 0th argument of pr: p, plus, eq, zero, divides, div, if, pr, times, quot
The following defined symbols can occur below the 1th argument of pr: p, plus, eq, zero, divides, div, if, pr, times, quot

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
quot(zero(y), s(y), z) → 0
div(div(x, y), z) → div(x, times(zero(y), z))
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^4).


The TRS R consists of the following rules:

p(0) → 0
plus(x, s(y)) → s(plus(x, p(s(y))))
p(s(x)) → x
divides(y, x) → eq(x, times(div(x, y), y))
div(x, y) → quot(x, y, y)
times(0, y) → 0
pr(x, s(0)) → true
quot(x, 0, s(z)) → s(div(x, s(z)))
div(0, y) → 0
times(s(0), y) → y
if(false, x, y) → pr(x, y)
plus(s(x), y) → s(plus(x, y))
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
times(s(x), y) → plus(y, times(x, y))
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
plus(x, 0) → x
plus(0, y) → y
if(true, x, y) → false
plus(s(x), y) → s(plus(p(s(x)), y))
eq(0, 0) → true
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
prime(s(s(x))) → pr(s(s(x)), s(x))
quot(s(x), s(y), z) → quot(x, y, z)

Rewrite Strategy: INNERMOST

(3) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^4).


The TRS R consists of the following rules:

p(0) → 0 [1]
plus(x, s(y)) → s(plus(x, p(s(y)))) [1]
p(s(x)) → x [1]
divides(y, x) → eq(x, times(div(x, y), y)) [1]
div(x, y) → quot(x, y, y) [1]
times(0, y) → 0 [1]
pr(x, s(0)) → true [1]
quot(x, 0, s(z)) → s(div(x, s(z))) [1]
div(0, y) → 0 [1]
times(s(0), y) → y [1]
if(false, x, y) → pr(x, y) [1]
plus(s(x), y) → s(plus(x, y)) [1]
eq(s(x), 0) → false [1]
eq(0, s(y)) → false [1]
eq(s(x), s(y)) → eq(x, y) [1]
times(s(x), y) → plus(y, times(x, y)) [1]
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y)) [1]
plus(x, 0) → x [1]
plus(0, y) → y [1]
if(true, x, y) → false [1]
plus(s(x), y) → s(plus(p(s(x)), y)) [1]
eq(0, 0) → true [1]
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0)))) [1]
prime(s(s(x))) → pr(s(s(x)), s(x)) [1]
quot(s(x), s(y), z) → quot(x, y, z) [1]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

p(0) → 0 [1]
plus(x, s(y)) → s(plus(x, p(s(y)))) [1]
p(s(x)) → x [1]
divides(y, x) → eq(x, times(div(x, y), y)) [1]
div(x, y) → quot(x, y, y) [1]
times(0, y) → 0 [1]
pr(x, s(0)) → true [1]
quot(x, 0, s(z)) → s(div(x, s(z))) [1]
div(0, y) → 0 [1]
times(s(0), y) → y [1]
if(false, x, y) → pr(x, y) [1]
plus(s(x), y) → s(plus(x, y)) [1]
eq(s(x), 0) → false [1]
eq(0, s(y)) → false [1]
eq(s(x), s(y)) → eq(x, y) [1]
times(s(x), y) → plus(y, times(x, y)) [1]
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y)) [1]
plus(x, 0) → x [1]
plus(0, y) → y [1]
if(true, x, y) → false [1]
plus(s(x), y) → s(plus(p(s(x)), y)) [1]
eq(0, 0) → true [1]
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0)))) [1]
prime(s(s(x))) → pr(s(s(x)), s(x)) [1]
quot(s(x), s(y), z) → quot(x, y, z) [1]

The TRS has the following type information:
p :: 0:s:true:false → 0:s:true:false
0 :: 0:s:true:false
plus :: 0:s:true:false → 0:s:true:false → 0:s:true:false
s :: 0:s:true:false → 0:s:true:false
divides :: 0:s:true:false → 0:s:true:false → 0:s:true:false
eq :: 0:s:true:false → 0:s:true:false → 0:s:true:false
times :: 0:s:true:false → 0:s:true:false → 0:s:true:false
div :: 0:s:true:false → 0:s:true:false → 0:s:true:false
quot :: 0:s:true:false → 0:s:true:false → 0:s:true:false → 0:s:true:false
pr :: 0:s:true:false → 0:s:true:false → 0:s:true:false
true :: 0:s:true:false
if :: 0:s:true:false → 0:s:true:false → 0:s:true:false → 0:s:true:false
false :: 0:s:true:false
zero :: 0:s:true:false → 0:s:true:false
prime :: 0:s:true:false → 0:s:true:false

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


prime

(c) The following functions are completely defined:

p
times
div
divides
eq
plus
zero
quot
if
pr

Due to the following rules being added:

p(v0) → null_p [0]
times(v0, v1) → null_times [0]
eq(v0, v1) → null_eq [0]
plus(v0, v1) → null_plus [0]
zero(v0) → null_zero [0]
quot(v0, v1, v2) → null_quot [0]
if(v0, v1, v2) → null_if [0]
pr(v0, v1) → null_pr [0]

And the following fresh constants:

null_p, null_times, null_eq, null_plus, null_zero, null_quot, null_if, null_pr

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

p(0) → 0 [1]
plus(x, s(y)) → s(plus(x, p(s(y)))) [1]
p(s(x)) → x [1]
divides(y, x) → eq(x, times(div(x, y), y)) [1]
div(x, y) → quot(x, y, y) [1]
times(0, y) → 0 [1]
pr(x, s(0)) → true [1]
quot(x, 0, s(z)) → s(div(x, s(z))) [1]
div(0, y) → 0 [1]
times(s(0), y) → y [1]
if(false, x, y) → pr(x, y) [1]
plus(s(x), y) → s(plus(x, y)) [1]
eq(s(x), 0) → false [1]
eq(0, s(y)) → false [1]
eq(s(x), s(y)) → eq(x, y) [1]
times(s(x), y) → plus(y, times(x, y)) [1]
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y)) [1]
plus(x, 0) → x [1]
plus(0, y) → y [1]
if(true, x, y) → false [1]
plus(s(x), y) → s(plus(p(s(x)), y)) [1]
eq(0, 0) → true [1]
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0)))) [1]
prime(s(s(x))) → pr(s(s(x)), s(x)) [1]
quot(s(x), s(y), z) → quot(x, y, z) [1]
p(v0) → null_p [0]
times(v0, v1) → null_times [0]
eq(v0, v1) → null_eq [0]
plus(v0, v1) → null_plus [0]
zero(v0) → null_zero [0]
quot(v0, v1, v2) → null_quot [0]
if(v0, v1, v2) → null_if [0]
pr(v0, v1) → null_pr [0]

The TRS has the following type information:
p :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
0 :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
plus :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
s :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
divides :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
eq :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
times :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
div :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
quot :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
pr :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
true :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
if :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
false :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
zero :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
prime :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_p :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_times :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_eq :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_plus :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_zero :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_quot :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_if :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_pr :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr

Rewrite Strategy: INNERMOST

(9) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(10) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

p(0) → 0 [1]
plus(x, s(y)) → s(plus(x, y)) [2]
plus(x, s(y)) → s(plus(x, null_p)) [1]
p(s(x)) → x [1]
divides(y, x) → eq(x, times(quot(x, y, y), y)) [2]
divides(y, 0) → eq(0, times(0, y)) [2]
div(x, y) → quot(x, y, y) [1]
times(0, y) → 0 [1]
pr(x, s(0)) → true [1]
quot(x, 0, s(z)) → s(div(x, s(z))) [1]
div(0, y) → 0 [1]
times(s(0), y) → y [1]
if(false, x, y) → pr(x, y) [1]
plus(s(x), y) → s(plus(x, y)) [1]
eq(s(x), 0) → false [1]
eq(0, s(y)) → false [1]
eq(s(x), s(y)) → eq(x, y) [1]
times(s(0), y) → plus(y, 0) [2]
times(s(s(0)), y) → plus(y, y) [2]
times(s(s(x')), y) → plus(y, plus(y, times(x', y))) [2]
times(s(x), y) → plus(y, null_times) [1]
pr(x, s(s(y))) → if(eq(x, times(div(x, s(s(y))), s(s(y)))), x, s(y)) [2]
plus(x, 0) → x [1]
plus(0, y) → y [1]
if(true, x, y) → false [1]
plus(s(x), y) → s(plus(x, y)) [2]
plus(s(x), y) → s(plus(null_p, y)) [1]
eq(0, 0) → true [1]
zero(s(0)) → if(false, plus(null_zero, 0), s(plus(0, null_zero))) [2]
zero(s(s(x''))) → if(eq(x'', 0), plus(null_zero, 0), s(plus(0, null_zero))) [2]
zero(s(x)) → if(null_eq, plus(null_zero, 0), s(plus(0, null_zero))) [1]
prime(s(s(x))) → pr(s(s(x)), s(x)) [1]
quot(s(x), s(y), z) → quot(x, y, z) [1]
p(v0) → null_p [0]
times(v0, v1) → null_times [0]
eq(v0, v1) → null_eq [0]
plus(v0, v1) → null_plus [0]
zero(v0) → null_zero [0]
quot(v0, v1, v2) → null_quot [0]
if(v0, v1, v2) → null_if [0]
pr(v0, v1) → null_pr [0]

The TRS has the following type information:
p :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
0 :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
plus :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
s :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
divides :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
eq :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
times :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
div :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
quot :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
pr :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
true :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
if :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
false :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
zero :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
prime :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr → 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_p :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_times :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_eq :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_plus :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_zero :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_quot :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_if :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr
null_pr :: 0:s:true:false:null_p:null_times:null_eq:null_plus:null_zero:null_quot:null_if:null_pr

Rewrite Strategy: INNERMOST

(11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

0 => 0
true => 2
false => 1
null_p => 0
null_times => 0
null_eq => 0
null_plus => 0
null_zero => 0
null_quot => 0
null_if => 0
null_pr => 0

(12) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(x, y, y) :|: z' = x, z'' = y, x >= 0, y >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' = y, y >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(x, times(quot(x, y, y), y)) :|: y >= 0, x >= 0, z'' = x, z' = y
divides(z', z'') -{ 2 }→ eq(0, times(0, y)) :|: z'' = 0, y >= 0, z' = y
eq(z', z'') -{ 1 }→ eq(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 1 + x, x >= 0
eq(z', z'') -{ 1 }→ 1 :|: y >= 0, z'' = 1 + y, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
if(z', z'', z1) -{ 1 }→ pr(x, y) :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ x :|: z' = 1 + x, x >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: v0 >= 0, z' = v0
plus(z', z'') -{ 1 }→ x :|: z'' = 0, z' = x, x >= 0
plus(z', z'') -{ 1 }→ y :|: z'' = y, y >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
plus(z', z'') -{ 2 }→ 1 + plus(x, y) :|: z' = x, x >= 0, y >= 0, z'' = 1 + y
plus(z', z'') -{ 1 }→ 1 + plus(x, y) :|: z' = 1 + x, z'' = y, x >= 0, y >= 0
plus(z', z'') -{ 2 }→ 1 + plus(x, y) :|: z' = 1 + x, z'' = y, x >= 0, y >= 0
plus(z', z'') -{ 1 }→ 1 + plus(x, 0) :|: z' = x, x >= 0, y >= 0, z'' = 1 + y
plus(z', z'') -{ 1 }→ 1 + plus(0, y) :|: z' = 1 + x, z'' = y, x >= 0, y >= 0
pr(z', z'') -{ 2 }→ if(eq(x, times(div(x, 1 + (1 + y)), 1 + (1 + y))), x, 1 + y) :|: z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y)
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 1 }→ pr(1 + (1 + x), 1 + x) :|: x >= 0, z' = 1 + (1 + x)
quot(z', z'', z1) -{ 1 }→ quot(x, y, z) :|: z' = 1 + x, z1 = z, z >= 0, x >= 0, y >= 0, z'' = 1 + y
quot(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
quot(z', z'', z1) -{ 1 }→ 1 + div(x, 1 + z) :|: z'' = 0, z >= 0, z' = x, x >= 0, z1 = 1 + z
times(z', z'') -{ 1 }→ y :|: z'' = y, y >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(y, y) :|: z' = 1 + (1 + 0), z'' = y, y >= 0
times(z', z'') -{ 2 }→ plus(y, plus(y, times(x', y))) :|: z' = 1 + (1 + x'), z'' = y, x' >= 0, y >= 0
times(z', z'') -{ 2 }→ plus(y, 0) :|: z'' = y, y >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(y, 0) :|: z' = 1 + x, z'' = y, x >= 0, y >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' = y, y >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
zero(z') -{ 2 }→ if(eq(x'', 0), plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + (1 + x''), x'' >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + x, x >= 0
zero(z') -{ 0 }→ 0 :|: v0 >= 0, z' = v0

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 }→ eq(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 2 }→ if(eq(z' - 2, 0), plus(0, 0), 1 + plus(0, 0)) :|: z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ eq }
{ div, quot }
{ plus }
{ p }
{ times }
{ if, pr }
{ divides }
{ prime }
{ zero }

(16) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 }→ eq(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 2 }→ if(eq(z' - 2, 0), plus(0, 0), 1 + plus(0, 0)) :|: z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {eq}, {div,quot}, {plus}, {p}, {times}, {if,pr}, {divides}, {prime}, {zero}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: eq
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(18) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 }→ eq(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 2 }→ if(eq(z' - 2, 0), plus(0, 0), 1 + plus(0, 0)) :|: z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {eq}, {div,quot}, {plus}, {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: ?, size: O(1) [2]

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: eq
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z''

(20) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 }→ eq(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 2 }→ if(eq(z' - 2, 0), plus(0, 0), 1 + plus(0, 0)) :|: z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {div,quot}, {plus}, {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 3 }→ if(s', plus(0, 0), 1 + plus(0, 0)) :|: s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {div,quot}, {plus}, {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: div
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

Computed SIZE bound using KoAT for: quot
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z'

(24) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 3 }→ if(s', plus(0, 0), 1 + plus(0, 0)) :|: s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {div,quot}, {plus}, {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: ?, size: O(n1) [z']
quot: runtime: ?, size: O(n1) [1 + z']

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: div
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + 3·z'

Computed RUNTIME bound using KoAT for: quot
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 3 + 3·z' + z''

(26) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', z'') :|: z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 2 }→ eq(z'', times(quot(z'', z', z'), z')) :|: z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 2 }→ if(eq(z', times(div(z', 1 + (1 + (z'' - 2))), 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 1 }→ quot(z' - 1, z'' - 1, z1) :|: z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 1 }→ 1 + div(z', 1 + (z1 - 1)) :|: z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 3 }→ if(s', plus(0, 0), 1 + plus(0, 0)) :|: s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {plus}, {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']

(27) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(28) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 3 }→ if(s', plus(0, 0), 1 + plus(0, 0)) :|: s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {plus}, {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: plus
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z' + z''

(30) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 3 }→ if(s', plus(0, 0), 1 + plus(0, 0)) :|: s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {plus}, {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: ?, size: O(n1) [z' + z'']

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: plus
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 2·z' + 2·z''

(32) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z', 0) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z', z'' - 1) :|: z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 1 }→ 1 + plus(0, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 }→ 1 + plus(z' - 1, z'') :|: z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', z'') :|: z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 }→ plus(z'', 0) :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ plus(z'', 0) :|: z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 3 }→ if(s', plus(0, 0), 1 + plus(0, 0)) :|: s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 2 }→ if(1, plus(0, 0), 1 + plus(0, 0)) :|: z' = 1 + 0
zero(z') -{ 1 }→ if(0, plus(0, 0), 1 + plus(0, 0)) :|: z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']

(33) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(34) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: p
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

(36) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {p}, {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: ?, size: O(n1) [z']

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: p
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(38) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']

(39) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(40) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']

(41) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using PUBS for: times
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 2·z'·z'' + 2·z''

(42) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {times}, {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: ?, size: O(n2) [2·z'·z'' + 2·z'']

(43) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: times
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 10 + 4·z' + 8·z'2·z'' + 8·z''

(44) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 5 + z' + 3·z'' }→ eq(z'', times(s'', z')) :|: s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 2 }→ eq(0, times(0, z')) :|: z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 4 + 3·z' }→ if(eq(z', times(s3, 1 + (1 + (z'' - 2)))), z', 1 + (z'' - 2)) :|: s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 2 }→ plus(z'', plus(z'', times(z' - 2, z''))) :|: z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']

(45) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(46) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 15 + s26 + 4·s3 + 8·s32·z'' + 3·z' + 8·z'' }→ if(s27, z', 1 + (z'' - 2)) :|: s26 >= 0, s26 <= 2 * (s3 * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s27 >= 0, s27 <= 2, s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']

(47) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

Computed SIZE bound using CoFloCo for: pr
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(48) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 15 + s26 + 4·s3 + 8·s32·z'' + 3·z' + 8·z'' }→ if(s27, z', 1 + (z'' - 2)) :|: s26 >= 0, s26 <= 2 * (s3 * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s27 >= 0, s27 <= 2, s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: ?, size: O(1) [2]
pr: runtime: ?, size: O(1) [2]

(49) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(n4) with polynomial bound: 18 + 7·z'' + 16·z''·z1 + 4·z''·z12 + 8·z''2·z1 + 16·z''2·z12 + 42·z1 + 20·z12

Computed RUNTIME bound using CoFloCo for: pr
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(50) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(z'', z1) :|: z'' >= 0, z1 >= 0, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z' = 2, z'' >= 0, z1 >= 0
if(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 15 + s26 + 4·s3 + 8·s32·z'' + 3·z' + 8·z'' }→ if(s27, z', 1 + (z'' - 2)) :|: s26 >= 0, s26 <= 2 * (s3 * (1 + (1 + (z'' - 2)))) + 2 * (1 + (1 + (z'' - 2))), s27 >= 0, s27 <= 2, s3 >= 0, s3 <= 1 * z', z' >= 0, z'' - 2 >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [18 + 7·z'' + 16·z''·z1 + 4·z''·z12 + 8·z''2·z1 + 16·z''2·z12 + 42·z1 + 20·z12], size: O(1) [2]
pr: runtime: INF, size: O(1) [2]

(51) RetryTechniqueProof (BOTH BOUNDS(ID, ID) transformation)

Performed narrowing of the following TRS rules:

if(false, x, y) → pr(x, y) [1]
if(true, x, y) → false [1]
if(v0, v1, v2) → null_if [0]
pr(x, s(0)) → true [1]
pr(x, s(s(y))) → if(eq(x, times(div(x, s(s(y))), s(s(y)))), x, s(y)) [2]
pr(v0, v1) → null_pr [0]

And obtained the following new TRS rules:

if(false, x, y) → pr(x, y) [1]
if(true, x, y) → false [1]
if(v0, v1, v2) → null_if [0]
pr(x, s(0)) → true [1]
pr(x, s(s(y))) → if(eq(x, times(quot(x, s(s(y)), s(s(y))), s(s(y)))), x, s(y)) [3]
pr(0, s(s(y))) → if(eq(0, times(0, s(s(y)))), 0, s(y)) [3]
pr(v0, v1) → null_pr [0]

Which were then size abstracted to RNTS rules to simplify the current SCC:

if(z', z'', z1) -{ 1 }→ pr(x, y) :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 3 }→ if(eq(x, times(quot(x, 1 + (1 + y), 1 + (1 + y)), 1 + (1 + y))), x, 1 + y) :|: z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y)
pr(z', z'') -{ 3 }→ if(eq(0, times(0, 1 + (1 + y))), 0, 1 + y) :|: y >= 0, z'' = 1 + (1 + y), z' = 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0

(52) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(x, y) :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 3 }→ if(eq(x, times(quot(x, 1 + (1 + y), 1 + (1 + y)), 1 + (1 + y))), x, 1 + y) :|: z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y)
pr(z', z'') -{ 3 }→ if(eq(0, times(0, 1 + (1 + y))), 0, 1 + y) :|: y >= 0, z'' = 1 + (1 + y), z' = 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']

(53) InliningProof (UPPER BOUND(ID) transformation)

Inlined the following terminating rules on right-hand sides where appropriate:

eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0

(54) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(x, y) :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 + 3·x + y }→ if(eq(x, times(s4, 1 + (1 + y))), x, 1 + y) :|: z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 3 }→ if(eq(x, times(0, 1 + (1 + y))), x, 1 + y) :|: z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 3 }→ if(eq(0, 0), 0, 1 + y) :|: y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 4 }→ if(eq(0, 0), 0, 1 + y) :|: y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']

(55) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(56) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(x, y) :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 }→ if(s26, 0, 1 + y) :|: s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 32 + s27 + 4·s4 + 16·s42 + 8·s42·y + 3·x + 9·y }→ if(s28, x, 1 + y) :|: s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 4 }→ if(s3, 0, 1 + y) :|: s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 30 + s29 + 8·y }→ if(s30, x, 1 + y) :|: s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']

(57) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

Computed SIZE bound using CoFloCo for: pr
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(58) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(x, y) :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 }→ if(s26, 0, 1 + y) :|: s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 32 + s27 + 4·s4 + 16·s42 + 8·s42·y + 3·x + 9·y }→ if(s28, x, 1 + y) :|: s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 4 }→ if(s3, 0, 1 + y) :|: s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 30 + s29 + 8·y }→ if(s30, x, 1 + y) :|: s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {if,pr}, {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: ?, size: O(1) [2]
pr: runtime: ?, size: O(1) [2]

(59) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(n4) with polynomial bound: 82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12

Computed RUNTIME bound using KoAT for: pr
after applying outer abstraction to obtain an ITS,
resulting in: O(n4) with polynomial bound: 1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2

(60) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1 }→ pr(x, y) :|: z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 5 }→ if(s26, 0, 1 + y) :|: s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 32 + s27 + 4·s4 + 16·s42 + 8·s42·y + 3·x + 9·y }→ if(s28, x, 1 + y) :|: s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 4 }→ if(s3, 0, 1 + y) :|: s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 30 + s29 + 8·y }→ if(s30, x, 1 + y) :|: s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 1 }→ pr(1 + (1 + (z' - 2)), 1 + (z' - 2)) :|: z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 5 }→ if(s', s15, 1 + s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 4 }→ if(1, s13, 1 + s14) :|: s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 3 }→ if(0, s17, 1 + s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]

(61) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(62) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]

(63) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: divides
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(64) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {divides}, {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]
divides: runtime: ?, size: O(1) [2]

(65) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: divides
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 33 + 31·z' + 18·z'·z'' + 8·z'·z''2 + 7·z''

(66) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]
divides: runtime: O(n3) [33 + 31·z' + 18·z'·z'' + 8·z'·z''2 + 7·z''], size: O(1) [2]

(67) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(68) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]
divides: runtime: O(n3) [33 + 31·z' + 18·z'·z'' + 8·z'·z''2 + 7·z''], size: O(1) [2]

(69) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: prime
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(70) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {prime}, {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]
divides: runtime: O(n3) [33 + 31·z' + 18·z'·z'' + 8·z'·z''2 + 7·z''], size: O(1) [2]
prime: runtime: ?, size: O(1) [2]

(71) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: prime
after applying outer abstraction to obtain an ITS,
resulting in: O(n4) with polynomial bound: 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4

(72) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]
divides: runtime: O(n3) [33 + 31·z' + 18·z'·z'' + 8·z'·z''2 + 7·z''], size: O(1) [2]
prime: runtime: O(n4) [388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4], size: O(1) [2]

(73) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(74) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]
divides: runtime: O(n3) [33 + 31·z' + 18·z'·z'' + 8·z'·z''2 + 7·z''], size: O(1) [2]
prime: runtime: O(n4) [388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4], size: O(1) [2]

(75) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: zero
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(76) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed: {zero}
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]
divides: runtime: O(n3) [33 + 31·z' + 18·z'·z'' + 8·z'·z''2 + 7·z''], size: O(1) [2]
prime: runtime: O(n4) [388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4], size: O(1) [2]
zero: runtime: ?, size: O(1) [2]

(77) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: zero
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 310

(78) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 4 + 3·z' + z'' }→ s1 :|: s1 >= 0, s1 <= 1 * z' + 1, z' >= 0, z'' >= 0
div(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
divides(z', z'') -{ 16 + 4·s'' + 8·s''2·z' + s19 + 9·z' + 3·z'' }→ s20 :|: s19 >= 0, s19 <= 2 * (s'' * z') + 2 * z', s20 >= 0, s20 <= 2, s'' >= 0, s'' <= 1 * z'' + 1, z' >= 0, z'' >= 0
divides(z', z'') -{ 13 + s21 + 8·z' }→ s22 :|: s21 >= 0, s21 <= 2 * (0 * z') + 2 * z', s22 >= 0, s22 <= 2, z'' = 0, z' >= 0
eq(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 2, z' - 1 >= 0, z'' - 1 >= 0
eq(z', z'') -{ 1 }→ 2 :|: z'' = 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' - 1 >= 0, z' = 0
eq(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
eq(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
if(z', z'', z1) -{ 1301 + 89·x + 66·x·y + 8·x·y2 + 160·x2 + 152·x2·y + 32·x2·y2 + 1081·y + 168·y2 }→ s34 :|: s34 >= 0, s34 <= 2, z1 = y, x >= 0, y >= 0, z'' = x, z' = 1
if(z', z'', z1) -{ 1 }→ 1 :|: z1 = y, z' = 2, x >= 0, y >= 0, z'' = x
if(z', z'', z1) -{ 0 }→ 0 :|: v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, z' = v0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 0 }→ 0 :|: z' >= 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s11 :|: s11 >= 0, s11 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 2 + 2·z'' }→ 1 + s12 :|: s12 >= 0, s12 <= 1 * 0 + 1 * z'', z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 + 2·z' + 2·z'' }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * z' + 1 * (z'' - 1), z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2 + 2·z' }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * z' + 1 * 0, z' >= 0, z'' - 1 >= 0
plus(z', z'') -{ 2·z' + 2·z'' }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * (z' - 1) + 1 * z'', z' - 1 >= 0, z'' >= 0
pr(z', z'') -{ 309 + 265·y + 42·y2 }→ s36 :|: s36 >= 0, s36 <= 2, s3 >= 0, s3 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 0 >= 0, 1 + (1 + y) >= 0
pr(z', z'') -{ 310 + 265·y + 42·y2 }→ s37 :|: s37 >= 0, s37 <= 2, s26 >= 0, s26 <= 2, y >= 0, z'' = 1 + (1 + y), z' = 0, 1 + (1 + y) >= 0, 0 = 0
pr(z', z'') -{ 337 + s27 + 4·s4 + 16·s42 + 8·s42·y + 42·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 274·y + 42·y2 }→ s38 :|: s38 >= 0, s38 <= 2, s27 >= 0, s27 <= 2 * (s4 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s28 >= 0, s28 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), s4 >= 0, s4 <= 1 * (x - 1) + 1, 1 + (1 + y) >= 0, x - 1 >= 0, 1 + (1 + y) - 1 >= 0
pr(z', z'') -{ 335 + s29 + 39·x + 32·x·y + 4·x·y2 + 72·x2 + 72·x2·y + 16·x2·y2 + 273·y + 42·y2 }→ s39 :|: s39 >= 0, s39 <= 2, s29 >= 0, s29 <= 2 * (0 * (1 + (1 + y))) + 2 * (1 + (1 + y)), s30 >= 0, s30 <= 2, z' = x, x >= 0, y >= 0, z'' = 1 + (1 + y), 1 + (1 + y) >= 0
pr(z', z'') -{ 1 }→ 2 :|: z' = x, x >= 0, z'' = 1 + 0
pr(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
prime(z') -{ 388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4 }→ s33 :|: s33 >= 0, s33 <= 2, z' - 2 >= 0
quot(z', z'', z1) -{ 3·z' + z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (z' - 1) + 1, z1 >= 0, z' - 1 >= 0, z'' - 1 >= 0
quot(z', z'', z1) -{ 0 }→ 0 :|: z' >= 0, z'' >= 0, z1 >= 0
quot(z', z'', z1) -{ 3 + 3·z' }→ 1 + s2 :|: s2 >= 0, s2 <= 1 * z', z'' = 0, z1 - 1 >= 0, z' >= 0
times(z', z'') -{ 2 + 2·z'' }→ s10 :|: s10 >= 0, s10 <= 1 * z'' + 1 * 0, z' - 1 >= 0, z'' >= 0
times(z', z'') -{ 6 + 2·s23 + 2·s24 + 4·z' + -32·z'·z'' + 8·z'2·z'' + 44·z'' }→ s25 :|: s23 >= 0, s23 <= 2 * ((z' - 2) * z'') + 2 * z'', s24 >= 0, s24 <= 1 * z'' + 1 * s23, s25 >= 0, s25 <= 1 * z'' + 1 * s24, z' - 2 >= 0, z'' >= 0
times(z', z'') -{ 3 + 2·z'' }→ s8 :|: s8 >= 0, s8 <= 1 * z'' + 1 * 0, z'' >= 0, z' = 1 + 0
times(z', z'') -{ 3 + 4·z'' }→ s9 :|: s9 >= 0, s9 <= 1 * z'' + 1 * z'', z' = 1 + (1 + 0), z'' >= 0
times(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 1 + 0
times(z', z'') -{ 0 }→ 0 :|: z' >= 0, z'' >= 0
times(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
zero(z') -{ 309 + 39·s13 + 32·s13·s14 + 4·s13·s142 + 72·s132 + 72·s132·s14 + 16·s132·s142 + 265·s14 + 42·s142 }→ s31 :|: s31 >= 0, s31 <= 2, s13 >= 0, s13 <= 1 * 0 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z' = 1 + 0
zero(z') -{ 310 + 39·s15 + 32·s15·s16 + 4·s15·s162 + 72·s152 + 72·s152·s16 + 16·s152·s162 + 265·s16 + 42·s162 }→ s32 :|: s32 >= 0, s32 <= 2, s15 >= 0, s15 <= 1 * 0 + 1 * 0, s16 >= 0, s16 <= 1 * 0 + 1 * 0, s' >= 0, s' <= 2, z' - 2 >= 0
zero(z') -{ 308 + 39·s17 + 32·s17·s18 + 4·s17·s182 + 72·s172 + 72·s172·s18 + 16·s172·s182 + 265·s18 + 42·s182 }→ s35 :|: s35 >= 0, s35 <= 2, s17 >= 0, s17 <= 1 * 0 + 1 * 0, s18 >= 0, s18 <= 1 * 0 + 1 * 0, z' - 1 >= 0
zero(z') -{ 0 }→ 0 :|: z' >= 0

Function symbols to be analyzed:
Previous analysis results are:
eq: runtime: O(n1) [1 + z''], size: O(1) [2]
div: runtime: O(n1) [2 + 3·z'], size: O(n1) [z']
quot: runtime: O(n1) [3 + 3·z' + z''], size: O(n1) [1 + z']
plus: runtime: O(n1) [1 + 2·z' + 2·z''], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
times: runtime: O(n3) [10 + 4·z' + 8·z'2·z'' + 8·z''], size: O(n2) [2·z'·z'' + 2·z'']
if: runtime: O(n4) [82 + 11·z'' + 24·z''·z1 + 4·z''·z12 + 16·z''2 + 40·z''2·z1 + 16·z''2·z12 + 181·z1 + 42·z12], size: O(1) [2]
pr: runtime: O(n4) [1300 + 89·z' + 66·z'·z'' + 8·z'·z''2 + 160·z'2 + 152·z'2·z'' + 32·z'2·z''2 + 1081·z'' + 168·z''2], size: O(1) [2]
divides: runtime: O(n3) [33 + 31·z' + 18·z'·z'' + 8·z'·z''2 + 7·z''], size: O(1) [2]
prime: runtime: O(n4) [388 + 776·z' + 258·z'2 + 96·z'3 + 32·z'4], size: O(1) [2]
zero: runtime: O(1) [310], size: O(1) [2]

(79) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(80) BOUNDS(1, n^4)